import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';
import { rules } from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '品牌编码',
    align: 'center',
    dataIndex: 'brandCode',
  },
  {
    title: '品牌名',
    align: 'center',
    dataIndex: 'brandName',
  },
  {
    title: '品牌logo',
    align: 'center',
    dataIndex: 'brandLogo',
    ifShow: false,
  },
  {
    title: '品牌所属分类',
    align: 'center',
    dataIndex: 'l1typeName',
  },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
  {
    label: '品牌编码',
    field: 'brandCode',
    component: 'JInput',
    //colProps: {span: 6},
  },
  {
    label: '品牌名称',
    field: 'brandName',
    component: 'JInput',
    //colProps: {span: 6},
  },
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '品牌编码',
    field: 'brandCode',
    component: 'Input',
    required: true,
  },
  {
    label: '品牌名',
    field: 'brandName',
    component: 'Input',
    required: true,
  },
  // {
  //   label: '品牌logo',
  //   field: 'brandLogo',
  //   component: 'Input',
  // },
  {
    label: '分类',
    field: 'l1Typecode',
    component: 'JSelectMultiple',
    componentProps: {
      dictCode: "xl_product_type,type_desc,id,pid='0'",
    },
    required: true,
  },
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
];

// 高级查询数据
export const superQuerySchema = {
  brandCode: { title: '品牌编码', order: 0, view: 'text', type: 'string' },
  brandName: { title: '品牌名', order: 1, view: 'text', type: 'string' },
  brandLogo: { title: '品牌logo', order: 2, view: 'text', type: 'string' },
  tenantId: { title: '租户id', order: 3, view: 'text', type: 'string' },
  isDeleted: { title: '是否删除', order: 4, view: 'text', type: 'string' },
};
/**
 * 流程表单调用这个方法获取formSchema
 * @param param
 */
export function getBpmFormSchema(_formData): FormSchema[] {
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}
